package cn.sinata.wanglin.model;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.List;

import cn.sinata.wanglin.utils.StringToUtils;

/**
 * 朋友圈数据实体
 */
public class Circle implements Serializable{
    private String id;//id
    @SerializedName("userID")
    private String authorId;//作者id
    @SerializedName("nickName")
    private String authorNick;//昵称
    @SerializedName("headUrl")
    private String authorAvatar;//头像
    @SerializedName("content")
    private String text;//文本
    @SerializedName("createDate")
    private long time;//时间
    @SerializedName("systemDate")
    private long systemTime;//系统时间
    @SerializedName("likes")
    private int likeNum;//点赞数
    @SerializedName("comments")
    private int commentNum;//评论数
    private List<Image> imgList;//图片地址集合
    @SerializedName("likesList")
    private List<Like> likeList;//点赞集合
    private List<Comment> commentList;//评论集合
    private int clickPraise = -1;//是否点赞 1：点过 0：没点
    private int countNum=0;//圈子八卦使用，其他页面没用
    @Expose
    private int contentLineCount = -1;
    @Expose
    private boolean showAll = false;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAuthorNick() {
        return authorNick;
    }

    public void setAuthorNick(String authorNick) {
        this.authorNick = authorNick;
    }

    public String getAuthorAvatar() {
        return authorAvatar;
    }

    public void setAuthorAvatar(String authorAvatar) {
        this.authorAvatar = authorAvatar;
    }

    public String getText() {
//        return StringToUtils.URLDecode(text);
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public int getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(int likeNum) {
        this.likeNum = likeNum;
    }

    public int getCommentNum() {
        return commentNum;
    }

    public void setCommentNum(int commentNum) {
        this.commentNum = commentNum;
    }

    public List<Image> getImages() {
        return imgList==null?new ArrayList<Image>():imgList;
    }

    public void setImages(List<Image> imgList) {
        this.imgList = imgList;
    }

    public List<Like> getLikeList() {
        return likeList;
    }

    public void setLikeList(List<Like> likeList) {
        this.likeList = likeList;
    }

    public List<Comment> getCommentList() {
        return commentList==null?new ArrayList<Comment>():commentList;
    }

    public void setCommentList(List<Comment> commentList) {
        this.commentList = commentList;
    }

    public long getSystemTime() {
        return systemTime;
    }

    public void setSystemTime(long systemTime) {
        this.systemTime = systemTime;
    }

    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }

    public int getClickPraise() {
        return clickPraise;
    }

    public void setClickPraise(int clickPraise) {
        this.clickPraise = clickPraise;
    }

    public int getCountNum() {
        return countNum;
    }

    public void setCountNum(int countNum) {
        this.countNum = countNum;
    }

    public int getContentLineCount() {
        return contentLineCount;
    }

    public void setContentLineCount(int contentLineCount) {
        this.contentLineCount = contentLineCount;
    }

    public boolean isShowAll() {
        return showAll;
    }

    public void setShowAll(boolean showAll) {
        this.showAll = showAll;
    }
}